package com.wyg.epkafkastarter.consumer.impl;

import com.wyg.epkafkastarter.constant.Topic;
import com.wyg.epkafkastarter.consumer.BatchConsumer;
import com.wyg.epkafkastarter.consumer.BatchConsumerBase;
import org.springframework.kafka.listener.ContainerProperties;

/**
 * Description:
 *
 * @author WangYongGan
 * @since 2022/6/2 14:11
 */
public class BatchConsumerImpl extends BatchConsumerBase {
    public static void start(Topic topic, BatchConsumer consumer) {
        BatchConsumerBase batchConsumerBase = new BatchConsumerBase();
        final ContainerProperties containerProperties = new ContainerProperties(topic.getValue());
        batchConsumerBase.start(batchConsumerBase, consumer, containerProperties);
    }
}
